package com.xlh.dao.courseTest;

import com.xlh.param.course.TheoryChapterLeanTimeStatisticsParam;
import com.xlh.param.course.TheoryLeanTimeStatisticsParam;
import com.xlh.param.course.TheoryVideoStatisticsParam;
import com.xlh.pojo.course.TheoryLearnTimeStatistics;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @author sy
 * 理论课视频时长统计Mapper
 */
@Repository
public interface TheoryLearnTimeMapper {


    TheoryLearnTimeStatistics findQueryTheoryVideoByChapterId(TheoryLearnTimeStatistics theoryVideoStatistics);

    void updateTheoryVideo(TheoryVideoStatisticsParam theoryVideoStatisticsParam);

    void deleteTheoryVideo(TheoryVideoStatisticsParam theoryVideoStatisticsParam);

    void insertTheoryVideo(TheoryLearnTimeStatistics theoryVideoStatisticsParam);

    Integer updateTheoryLearnTime(TheoryLearnTimeStatistics theoryVideoStatistics);

    List<TheoryLearnTimeStatistics> findVideoSumInfo( @Param("courseId") Long courseId,
                                                      @Param("classId") Long classId,
                                                      @Param("userIds") List<Long> userIds , @Param("chapterIds") List<Long> chapterIds);

    List<TheoryLearnTimeStatistics> findLearnTimeStatisticsByUserIds(TheoryChapterLeanTimeStatisticsParam theoryLeanTimeStatisticsParam);
}
